package com.conpany.project;

/**
 * @Author: zhaoqi
 * @Date: 2018/11/18 18:03
 * @Version 1.0
 */

public class CurrentThread {

    public static void main(String[] args) {

        Thread thread =  new Thread(){
            @Override
            public void run(){
                System.out.println(Thread.currentThread() == this);
            }
        };
        thread.start();

        String name = Thread.currentThread().getName();
        System.out.println(name);
        System.out.println("main".equals(name));

    }

}
